handle return values for library calls using aliases with different return types