sfinae-friendly result_of implementation for compilers that don't have extended sfinae for expressions