Fix headers to allow developing handlers in C++

Headers verified to work with gcc 4.7.2 and this code: https://gist.github.com/ArtemGr/5797289