simplify static asserts

Simplify static asserts to make them compatible with older compilers and MSVC 2013
Merge pull request #1063 from alex85k/patch-6

simplify static asserts