Use kvoptions package instead of custom code for package options.