Fix by oobayly for #2: Undeclared variable when compiling against Asterisk 11