Make code (more) portable