Only use log if it exists

minirake has log but rake doesn't. This should fix the issue introduced in #1105.