Link samples static

This allows to execute the samples without installing the library or setting LD_LIBRARY_PATH.