Add is_atom function
Better platform detection