'Modern Family' star reveals how he pranked his girlfriend for two months with his striking mustache