[PATCH v2 2/4] captive.cgi: Update code to check for the image content type not just the extension