Fall back to 2D mode when using software rendering

This sets a few env variables like cinnamon2d is also doing.