Man jailed for shaking baby