fixed const-ness errors
compiles under most strict C compilers (as checked by gcc)