Yes, the hotshoe is the same, and the flash will fit the shoe perfectly.
But you cannot get TTL to work properly (can't remember is it fire full power or refused to fire) and you can't get working in manual mode either.
If can work, the price of the 5400HS wouldn't be so low compared to the 5600HS(D)