configure: Set default HOSTCFLAGS/HOSTCPPFLAGS after compiler detection

This prevents the default HOSTCFLAGS from getting clobbered by flags
passed to configure on the command line.