Make pkgconfig optional instead of MSVC dependent
Fix builds on Windows (MSVC and MinGW, 32/64 bit)
Fix comparison warning in test_buffer