changed reinterpret_cast to static_cast

This issue seem to be lingering around for quite some time
https://github.com/Itseez/opencv/pull/639
http://code.opencv.org/issues/2819