Fixed handling of zero BSDF function evaluations
Fix for Windows and Unix