a few constness fixes; msvc 2013 support;

tiny bits :)