Measurement of CP asymmetries in two-body B (s)0 -meson decays to charged pions and kaons