Solves issue 3204: Alternative inclusion of <math.h> or <cmath> which generate an error for isnan (Bug #3204)

http://code.opencv.org/issues/3204#note-3