Added workarounds for various dependency build issues.