Support BP 1.2 better.

(That's right. There are still people using BP 1.2 with GES.)

Move 1.5 abstraction code above the fold so it is included before
our main code.

Thanks to defunctlife for testing.
Add missing 1.5 abstraction code.

See related commit 519c980.