Generation of custom modes in a Nd:YAG laser with a semipassive bimorph adaptive mirror