Pnictide-height dependent ferromagnetism in CuFeAs and CuFeSb