When you are up to solve something more complicated you need to understand few things first.
- all kernels come with headers package and they can be installed from the armbian-config menu -> software. Never install other generic headers from upstream distribution (from Debian or Ubuntu) because of it simply won't work.
- there is no difference between Debian and Ubuntu kernels. They are always the same. Diff can be only on our download page since we change targets sometimes and there is a diff but it's gone once you do first update + reboot
- use old 3.4.y kernel only if there is no other way
- the differences between Debian Jessie, Stretch, Ubuntu Xenial are in many areas, but why you face those problems is really hard to say. Compiler-related? Bugs in a library, driver, ...