Fix breaking sub reference on windows

I'm not a ruby guy but before making this change this line was throwing the error `undefined method downcase for nil`. This syntax change makes it work.