fixing linux luminance selction bug

ast_log2 didn't work as expected for linux - reimplementing it using
unions
Merge pull request #19 from matt-schwarz/master

Matt Schwarz - Fix regarding the linux luminance selection bug