Alternate-gradient focusing of a molecular beam of ammonia