Changed PlatformSpecificIsNan() to function pointer based interface

This will make it possible to run the NaN tests on systems that do not support NaN.

This pull request covers GCC only.