Fix static main entry point, with DCE support