OSL merge 6

Some changes needed to execute OSL shaders.