fixes for linux-based R build