replaced cast to implementation with a cast to the interface

Change-Id: I1c23f6d4e93b7a95ce3b5205d96a047d6d4053b7
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>