[Device] Fix device construction

Fix for bug #11.

This is a port of the same fix made for dleyna-server: https://github.com/01org/dleyna-server/pull/69