fix Issue 9723 - add missing main() when compiling exe with -unittest

fix http://d.puremagic.com/issues/show_bug.cgi?id=9723