fix incompatibilities with VS2013 (missing constexpr and uint) and solve signed/unsigned warnings