Re-adding compatibility bug fixes for linux.