Upgrade sugar_target_link_libraries

Add support for debug/optimized libraries.