Misc small fixes

* make sure GetNamePipeFileDescriptor only returns fds if handle is a named pipe
* fix sample channel build - was set to dynamic