Fix #436
Allocate back-end memory dynamically.
This raised the opportunity to structure the library more cleanly for each supported platform.