Revert "Fix compilation with samba release > 4.1.4 - use new API functions"

This reverts commit f160e5482599ff7d7f03ff6b1c7d550cf382b7da.
Merge branch 'master' into saucy