Make explicit error on print only emit if "print_function" is imported; issue #338