Mohammad Amir picked up five wickets, as he helped Pakistan bowl Australia out for 307 at the ICC World Cup.