Make 3603ec2c3 compatible with Emacs <24.2

A few compilation-related variables are not available in
Emacs version prior to 24.2