fix ZM_VERSION already defined error

use defined to check if a variable is already defined