Hit test on top of enemy

Im trying to make a mario like game where if you jump ontop of the enemy it gets smashed. Right now I have it so when you hit anywhere of the enemy you die. I want it so if you are on top of the enemies head it dies rather than you. How would I do that kind of hitTest?