made it compilable with non-C99 compilers