wrap packages required in a 'if !defined' to prevent conflicts with other modules