Replace flags.rs with stdlib bitflags macro