Enable HEAD option and add JPEG dependency