Fix target_link_libraries for shared core