Update func.cc

Fix for https://github.com/openscad/openscad/issues/322