fixed compilation for compilers that does not support c99