CMake: build in shared mode library

Signed-off-by: Eduardo Silva <eduardo.silva@oracle.com>