Visual Studio 13 Support

ReadBit:
- different rounding behavior requires careful value clamping (casting makes
  the VS build crash sometimes, and floor degrades the detection performance)

CMake:
- dynamic library is still built by default, but binaries are linked against a
  static library, to play nice with VS