Internal shear layers from librating objects