Separate library and test compilation by adding a 'make check' target to be able to install the library before compiling the tests