Fix linking to debug libs