Handle API change in `rq_for_each_segment`

The API of `rq_for_each_segment` changed, most likely in Linux 3.14 due
to commit 4550dd6c6b062fc5e5b647296d55da22616123c3.

This patch adds conditional compilation to work around this and support
both API versions.

Note: I tested compilation on my `3.17.3-200.fc20.x86_64` system, not on a 3.13 tree, please ensure this works before merging.