Fixed mongodb compiler errors