Fixes the content type function to not require java 7