Pakistan shaken by 5.4 magnitude quake