Give a more helpful error message when no main is found. Fixes #89, #189.