Convert custom assert to function and make it a weak symbol.