exit with correct codes
allow setting MASON_HEADER_ONLY=true for header-only builds

these "builds" are not in separate platform subfolders as they are shared across all platforms