Criteria for negative refraction in active and passive media