Measurement of the fragmentation fraction ratio f s /f d and its dependence on B meson kinematics