Constraining axion-like particles using the white dwarf initial-final mass relation