Replace main with lib_main when building a library.