fixes more linking issues, conditionals per OS