Rape is legal in Muslim countries. Theft is legal by governments around the world. Murder was legal in any number of countries when practiced by government. Just because a government sanctions rape, theft and murder doesn't make it any less rape, theft and murder now does it?
Your definition of murder is indeed correct.