Added maintainermode check for -Werror as suggested