Enhancement of critical current density and flux pinning in oxygen ion-irradiated MgB2 thin films