This doesn't look correct. You shouldn't call MapPort at all if USE_UPNP is not set.