Use \newcommand instead of \def