Tweak dependencies for more reliable and portable build