replaced applyToDefaults function to work with hapi 4.x