Fix compilation error with Python 2

This re-enables the 'register' keyword with C++17, which is still
required for Python 2.
7 jobs from master in 996 minutes and 55 seconds (queued for 3 seconds)
latest
Status Job ID Name Coverage
  Test
passed #3809
amd64
job_clang_amd64

08:17:02

passed #3813
amd64
job_clang_amd64_nosh

08:11:47

passed #3811
amd64
job_clang_py2_amd64

08:35:16

passed #3808
amd64
job_gcc_amd64

08:07:00

passed #3812
amd64
job_gcc_amd64_nosh

07:34:30

failed #3814
amd64
job_gcc_py2_amd64

08:01:35

failed #3810
amd64
job_gcc_py2_amd64

08:28:32

 
Name Stage Failure
failed
job_gcc_py2_amd64 Test

Doctest summary
===============
1059 tests
3 failures in tests
0 failures in setup code
0 failures in cleanup code
build finished with problems, 27 warnings.
ERROR: Job failed: exit status 1