Ab initio molecular dynamics simulation of the amorphous structure of Ca-Mg-Cu and Ca-Mg-Zn alloys