An immersed boundary method for high-fidelity simulations of moving objects on a Cartesian mesh