Fix erroneous return values of generated binaries by wrapping main